import service from '@/utils/request'

export const createOdsDbField = (data) => {
  return service({
    url: '/odsDbField/createOdsDbField',
    method: 'post',
    data
  })
}

export const deleteOdsDbField = (data) => {
  return service({
    url: '/odsDbField/deleteOdsDbField',
    method: 'delete',
    data
  })
}

export const deleteOdsDbFieldByIds = (data) => {
  return service({
    url: '/odsDbField/deleteOdsDbFieldByIds',
    method: 'delete',
    data
  })
}

export const updateOdsDbField = (data) => {
  return service({
    url: '/odsDbField/updateOdsDbField',
    method: 'put',
    data
  })
}

export const findOdsDbField = (params) => {
  return service({
    url: '/odsDbField/findOdsDbField',
    method: 'get',
    params
  })
}

export const getOdsDbFieldList = (params) => {
  return service({
    url: '/odsDbField/getOdsDbFieldList',
    method: 'get',
    params
  })
}

export const getAllOdsDbFields = (params) => {
  return service({
    url: '/odsDbField/getAllOdsDbFields',
    method: 'get',
    params
  })
}

export const getOdsDbTree = (params) => {
  return service({
    url: '/odsDbField/getOdsDbTree',
    method: 'get',
    params
  })
}
export const getOdsTbFld = (data) => {
  return service({
    url: '/odsDbField/getOdsTbFld',
    method: 'post',
    data
  })
}

export const saveOdsTbFld = (data) => {
  return service({
    url: '/odsDbField/saveOdsTbFld',
    method: 'post',
    data
  })
}

export const delOdsTbFld = (data) => {
  return service({
    url: '/odsDbField/delOdsTbFld',
    method: 'post',
    data
  })
}

export const getOdsSyncFld = (data) => {
  return service({
    url: '/odsDbField/getOdsSyncFld',
    method: 'post',
    data
  })
}

export const getOdsFldsByTbId = (data) => {
  return service({
    url: '/odsDbField/getOdsFldsByTbId',
    method: 'post',
    data
  })
}
